package me.maiz.lab.batchdemo;

import me.maiz.lab.batchdemo.batch.domain.UserOrderData;
import me.maiz.lab.batchdemo.dao.UserBatch;
import me.maiz.lab.batchdemo.xxljob.WeeklyUpdateUserCreditJob;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class TestController {
    @Resource
    private UserBatch userBatch;

    @Resource
    private WeeklyUpdateUserCreditJob weeklyUpdateUserCreditJob;

    @RequestMapping("test")
    public List<UserOrderData> userOrderData(){

        weeklyUpdateUserCreditJob.startJob();
        return null;
    }
}
